/*
 * acooly.cn Inc.
 * Copyright (c) 2017 All Rights Reserved.
 * create by ouwen
 * date:2017-09-20
 */
package com.yiji.fintech.musfinance.service.impl;

import com.acooly.core.common.service.EntityServiceImpl;
import com.yiji.fintech.musfinance.dao.InstChannelApiDao;
import com.yiji.fintech.musfinance.entity.InstChannelApi;
import com.yiji.fintech.musfinance.service.InstChannelApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * center_inst_channel_api Service实现
 *
 * Date: 2017-09-20 10:59:17
 *
 * @author ouwen
 *
 */
@Service("instChannelApiService")
public class InstChannelApiServiceImpl extends EntityServiceImpl<InstChannelApi, InstChannelApiDao> implements InstChannelApiService {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Override
    public InstChannelApi unique(String gatewayChannelApi) {
        return getEntityDao().findUniqu("EQ_gatewayChannelApi",gatewayChannelApi);
    }
    @Override
    public List<Map<String, Object>> getAllChannel() {
        return jdbcTemplate.queryForList("select GATEWAY_CHANNEL_API,GATEWAY_CHANNEL_API_DESC from center_inst_channel_api");
    }
}
